package com.digitalchina.lxnsy.sy.jibingzhiliao;

import android.webkit.JavascriptInterface;

import com.digitalchina.lxnsy.base.BaseHtmlActivity;
import com.digitalchina.lxnsy.sy.jgc.AddRawMilkConnectActivity;


public class DiseaseRecordActivity extends BaseHtmlActivity {
    private int tag = 0;

    @Override
    protected void loadHtml() {
        webView.addJavascriptObject(new JsApi(), null);

        loadUrl("diseaseRecord");
        setTitle("疾病诊疗记录");
        setRightText("新增");

    }


    @Override
    public void onResume() {
        super.onResume();
        if (tag > 0) {
            callJsMethod("refresh");
        }
        tag++;

    }

    @Override
    public void rightOnClick() {
        go(AddDiseaseRecordActivity.class);


    }


    public class JsApi {


        @JavascriptInterface
        public void viewDiseaseRecord(Object msg) {
           go(ViewDiseaseRecordActivity.class);

        }




    }
}
